FROM eclipse-temurin:21-jdk

WORKDIR /app

COPY simple-diary.jar app.jar

# 创建日志目录
RUN mkdir -p /app/log

# 暴露端口
EXPOSE 8080

# 启动命令，指定日志输出路径
ENTRYPOINT ["java", "-Dlogging.file.path=/app/log", "-jar", "app.jar"]
